Previous Book Contents Book Index Next

Inside Macintosh: Programming With JManager /
Chapter 3 - JManager Java Class Reference


The JMFrame Interface

The JMFrame interface contains structures and methods related to manipulating frames.

package com.apple.mrj.JManager;

/* A JMFrame is part of the peer implementation of a native window. */
/* It is created through a JMAWTContext callback. */

public interface JMFrame { 

   /* @Return the "C" version of the JMFrameRef object */ 
   public int getFrameRef();/* returns the JMFrameRef value */

   /* @Return the client specified data associated with this frame */ 
   public int getClientData() throws JManagerException;

   /* Set the client specified data associated with this frame */
   /* @param data the new data to set. */ 
   public void setClientData(int data) throws JManagerException;

   /* Update the Frame's visibility characteristics. This is */
   /* usually only called from C code. */
   /* @param framePort the port to bind this frame to */
   /* @frameOrigin offset in the port for 0,0 top left of the frame */
   /* @frameClip clipping region overlayed accross the framePort */ 
   public void setFrameVisibility(com.apple.MacOS.GrafPtr framePort,
      com.apple.MacOS.Point frameOrigin, 
      int /*com.apple.MacOS.RgnHandle*/ frameClip) 
      throws JManagerException;
   /* @returns the size and position of the frame */ 
   public com.apple.MacOS.Rect getFrameSize() throws JManagerException;

   /* Requests that the frame be resized to this size and location */
   /* @param newSize the new window size, including position */ 
   public void setFrameSize(com.apple.MacOS.Rect newSize) 
      throws JManagerException;

   /* Dispatch a mouse click to the frame. */
   /* @param localPos the mouse click in local coordinates */
   /* @param modifiers the modifiers from the event record */
   public void frameClick(com.apple.MacOS.Point localPos, 
      short modifiers) throws JManagerException;
   /* Dispatch a key press to the frame. */
   /* @param asciiChar the ascii value from the event record */
   /* @param keyCode the machine keycode value from the event record */
   /* @param modifiers the modifiers from the event record */ 
   public void frameKey(byte asciiChar, byte keyCode, 
      short modifiers) throws JManagerException;
   /* Dispatch a key release to the frame. */
   /* @param asciiChar the ascii value from the event record */
   /* @param keyCode the machine keycode value from the event record */
   /* @param modifiers the modifiers from the event record */ 
   public void frameKeyRelease(byte asciiChar, byte keyCode, 
      short modifiers) throws JManagerException;

   /* Dispatch an update event to the frame. */
   /* @param updateRgn the region to be updated in local coordinates */ 
   public void frameUpdate(int/*com.apple.MacOS.RgnHandle*/ updateRgn)
      throws JManagerException;
   /* Dispatch an activate event to the frame */
   /* @param activate set activate (true) or deactivate (false) event */ 
   public void frameActivate(boolean activate) throws JManagerException;

   /* Dispatch an application resume event to the frame */
   /* @param resume set a resume (true) or suspend (false) event */ 
   public void frameResume(boolean resume) throws JManagerException;

   /* Dispatch a mouse over event to the frame. */
   /* Used for cursor shaping */
   /* @param localPos the mouse location in local coordinates */
   /* @param modifiers the modifiers from the event record */ 
   public void frameMouseOver(com.apple.MacOS.Point localPos, 
      short modifiers) throws JManagerException;

   /* Show or hide the frame. */
   /* @param showFrame true to make the frame visible */ 
   public void frameShowHide(boolean showFrame) 
      throws JManagerException;

   /* Request that a frame be disposed. */ 
   public void frameGoAway() throws JManagerException;

   /* Return the AWTContext for this frame. */ 
   /* @see JMAWTContext */
   /* @return a JMAWTContext */ 
   public JMAWTContext getFrameContext() throws JManagerException;

   /* Post drag & drop events to the frame */
   /* @param message the message from the drag handler */
   /* @param theDragRef the drag reference from the drag handler */ 
   public void frameDragTracking(
      com.apple.MacOS.DragTrackingMessage message,
      com.apple.MacOS.DragReference theDragRef) 
      throws JManagerException;

   /* A drag was received for the frame. */
   /* @param theDragRef the drag reference from the drag handler */ 
   public void frameDragRecieve(
      com.apple.MacOS.DragReference theDragRef) 
      throws JManagerException;

   /* Return the java.awt.Frame for this frame */ 
   public java.awt.Frame getAwtFrame() throws JManagerException;

   /* If we're representing an applet viewer, which one? */
   /* @returns a JMAppletViewer representing the viewer */ 
   public JMAppletViewer getFrameViewer() throws JManagerException; 
}

Previous Book Contents Book Index Next

© Apple Computer, Inc.
10 DEC 1997